@extends('layout.admin')

@section('title','商家资料更新')

@section('content')
<div class="row">

    <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
        <div class="widget am-cf">
            <div class="widget-head am-cf">
                <div class="widget-title am-fl">商品资料更新</div>
                
            </div>
            <div class="widget-body am-fr">
                
                <form class="am-form tpl-form-border-form tpl-form-border-br" action="/adminShop/update" method="post" enctype="multipart/form-data">
                    @if (count($errors) > 0)
                    <div class="am-form-message error">
                        <ul>
                            @foreach ($errors->all() as $error)
                                <li>{{ $error }}</li>
                            @endforeach
                        </ul>
                    </div>
                    @endif
                    <div class="am-form-group">
                        <label for="user-name" class="am-u-sm-3 am-form-label">店家id</label>
                        <div class="am-u-sm-9">
                            <input type="text" class="tpl-form-input" id="user-name" value="{{Session('id')}}" name="spid" readonly>
                            
                        </div>
                    </div>

                    <div class="am-form-group">
                        <label for="user-name" class="am-u-sm-3 am-form-label">店铺名称</label>
                        <div class="am-u-sm-9">
                            <input type="text" class="tpl-form-input" id="user-name" name="shopname" value="{{$data->shopname}}">
                            
                        </div>
                    </div>

                    <div class="am-form-group">
                        <label for="user-name" class="am-u-sm-3 am-form-label">店铺分类</label>
                        <div class="am-u-sm-9">
                        <select name="sptype">
                            <option value="快餐">快餐</option>
                            <option value="小吃">小吃</option>
                            <option value="甜品">甜品</option>
                            <option value="果蔬">果蔬</option>
                            <option value="鲜花蛋糕">鲜花蛋糕</option>
                            <option value="夜宵">夜宵</option>
                        </select>
                        </div>
                    </div>                    
                                   

                    <div class="am-form-group">
                        <label for="user-name" class="am-u-sm-3 am-form-label">店铺公告</label>
                        <div class="am-u-sm-9">
                            <input type="text" class="tpl-form-input" id="user-name" value="{{$data->content}}" name="content">
                            
                        </div>
                    </div>

					<div class="am-form-group">
                        <label for="user-name" class="am-u-sm-3 am-form-label">店铺地址</label>
                        <div class="am-u-sm-9">
                            <input type="text" class="tpl-form-input" id="user-name" value="{{$data->address}}" name="address">
                            
                        </div>
                    </div>                    

                    <div class="am-form-group">
                        <label for="user-weibo" class="am-u-sm-3 am-form-label">店铺logo</label>
                        <img src="{{$data->logo}}" alt="" style="width:100px;float:left">
                        <input type="file" name="logo">
                    </div>                   

                    <div class="am-form-group">
                        <div class="am-u-sm-9 am-u-sm-push-3">
                            {{csrf_field()}}
                            <button type="submit" class="am-btn am-btn-primary tpl-btn-bg-color-success ">提交</button>
                            <input type="reset" class="am-btn am-btn-danger tpl-btn-bg-color-danger " value="重置">
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

@endsection
